package com.haoyeteng.sxbd.modular.business.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 用户地址表
 * </p>
 *
 * @author haoyeteng123
 * @since 2019-05-27
 */
@TableName("bus_address")
public class Address extends Model<Address> {

    private static final long serialVersionUID = 1L;

    /**
     * 地址Id
     */
    @TableId(value = "address_id", type = IdType.AUTO)
    private Integer addressId;
    /**
     * 用户Id
     */
    @TableField("user_id")
    private Integer userId;
    /**
     * 收件人姓名
     */
    private String name;
    /**
     * 手机号码
     */
    private String phone;
    /**
     * 地址
     */
    private String address;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 邮编
     */
    @TableField("zip_code")
    private String zipCode;
    /**
     * 是否默认(0否1是)
     */
    @TableField("if_default")
    private Integer ifDefault;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 删除标记
     */
    @TableLogic
    private Integer flag;


    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    public Integer getIfDefault() {
        return ifDefault;
    }

    public void setIfDefault(Integer ifDefault) {
        this.ifDefault = ifDefault;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    protected Serializable pkVal() {
        return this.addressId;
    }

    public Address() {
		super();
	}
    
	public Address(Integer userId, Integer ifDefault) {
		super();
		this.userId = userId;
		this.ifDefault = ifDefault;
	}

	@Override
    public String toString() {
        return "Address{" +
        "addressId=" + addressId +
        ", userId=" + userId +
        ", name=" + name +
        ", phone=" + phone +
        ", address=" + address +
        ", email=" + email +
        ", zipCode=" + zipCode +
        ", ifDefault=" + ifDefault +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", flag=" + flag +
        "}";
    }
}
